<ui:composition template="/site/private/template/template.xhtml" xmlns="http://www.w3.org/1999/xhtml"
			    xmlns:h="http://java.sun.com/jsf/html"
			    xmlns:f="http://java.sun.com/jsf/core"
			    xmlns:ui="http://java.sun.com/jsf/facelets"
			    xmlns:rich="http://richfaces.org/rich"
			    xmlns:t="http://myfaces.apache.org/tomahawk">
	
		<ui:define name="conteudo">
		
			<h:form id="form">
			
			<br/>
	
			<div align="center">
				<span><h:outputText value="#{mensagem['dica.titulo']}" /></span>
			</div>
			
			<br/>
		
			<h:panelGrid columns="2">
			
				<h:outputLabel value="${mensagem['dica.titulo.campo']}:" />
				<h:inputText value="${dicaEditMB.view.entidade.titulo}" disabled="#{dicaEditMB.blocked}" />
				
				<h:outputLabel value="${mensagem['dica.perfil']}:" /> 
				<h:selectOneMenu id="listMenu" value="${dicaEditMB.view.entidade.perfil}" disabled="#{dicaEditMB.blocked}">
					<f:selectItem itemLabel=""/>
					<t:selectItems value="${dicaListMB.view.listPerfil}" var="item" itemValue="${item}" itemLabel="${item.nome}"></t:selectItems>
				</h:selectOneMenu> 
				
				<h:outputLabel value="${mensagem['dica.dataexibicao']}:" />
				<rich:calendar value="#{dicaEditMB.view.entidade.dataExibicao}" datePattern="dd/MM/yyyy" 
						cellWidth="24px" cellHeight="22px" style="width:200px" disabled="#{dicaEditMB.blocked}" >
                </rich:calendar>
                
                <h:outputLabel value="${mensagem['dica.ativo']}:" />
				<h:selectBooleanCheckbox value="#{dicaEditMB.view.entidade.ativo}" disabled="#{dicaEditMB.blocked}" />
		 	
			</h:panelGrid>
			
			<h:panelGrid columns="1">
				<h:outputLabel value="${mensagem['dica.descricao']}:" />
			</h:panelGrid>
		
			<rich:editor id="editor" value="#{dicaEditMB.view.entidade.descricao}" rendered="#{!dicaEditMB.blocked}"></rich:editor>
			<t:div style="width: 90%; border: 1px solid green;" rendered="#{dicaEditMB.blocked}" >
				<h:outputText value="#{dicaEditMB.view.entidade.descricao}" escape="false"/>
			</t:div>
			
			<br/>
			
			<h:panelGrid columns="4">
				<h:commandButton action="#{dicaEditMB.salvar}" value="${mensagem.salvar}" rendered="#{dicaEditMB.insertMode or dicaEditMB.editMode}" />
				<h:commandButton action="#{dicaEditMB.excluir}" value="${mensagem.excluir}" rendered="#{dicaEditMB.excludMode}" />
				<h:commandButton action="#{dicaListMB.preConsultar}" value="${mensagem.voltar}" />
			</h:panelGrid>
			
			</h:form>
		
		</ui:define>
	
</ui:composition>